package com.party.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.party.common.annotation.Excel;
import com.party.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 评论对象 t_comment
 *
 * @author ruoyi
 * @date 2024-05-25
 */
@Data
@TableName(value = "t_comment")
@EqualsAndHashCode(callSuper = true)
public class TComment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * "评论内容"
     */
    @Excel(name = "评论内容")
    @NotBlank(message = "评论内容不能为空")
    @Size(min = 0, max = 1000, message = "评论内容不能超过1000个字符")
    private String content;

    /**
     * "业务Id"
     */
    @Excel(name = "业务Id")
    @NotBlank(message = "businessId不能为空")
    private String businessId;

    // 评论的业务类型  // 1论坛 2 好分享
    @NotBlank(message = "业务类型不能为空")
    private String businessType;

    /**
     * "用户Id"
     */
    @Excel(name = "用户Id")
    private String userId;

    private String delFlag;
    //被回复的用户Id
    private String hfUserId;
    //评论的哪个评论（第一层传0）
    private String parentCommentId;

    //楼层评论ID 第二层要记录（第一层传空）
    private String floorCommentId;



    /** 发布人头像 */
    @TableField(exist = false)
    private String avatar;


    /** 昵称 */
    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    private String parentCommentIdNo;


    /** 手机号 */
    @TableField(exist = false)
    private String phonenumber;
    /** 部门名称 */
    @TableField(exist = false)
    private String deptName;

    // 被回复的用户昵称
    @TableField(exist = false)
    private String hfNickName;
    // 被回复的用户头像
    @TableField(exist = false)
    private String hfAvatar;

    @TableField(exist = false)
    private List<TComment> childList;




}
